# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Maintainer: Fabian Bornschein <fabiscafe@archlinux.org>
# Contributor: Caleb Maclennan <caleb@alerque.com>
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Tobias Bohrmann (PlainTextField) <honeypot.carbage@aechelon.de>

pkgname=tepl
pkgver=6.8.0
pkgrel=1
epoch=1
pkgdesc='Library that eases the development of GtkSourceView-based text editors and IDEs'
arch=('loong64' 'x86_64')
url='https://gitlab.gnome.org/swilmet/tepl'
license=('LGPL3')
depends=('libgedit-amtk' 'cairo' 'glib2' 'glibc' 'gsettings-desktop-schemas' 
         'gtk3' 'libgedit-gtksourceview' 'icu' 'pango')
makedepends=('gobject-introspection' 'gtk-doc' 'meson')
checkdepends=('xorg-server-xvfb')
provides=('libtepl-6.so')
source=("https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz")
sha256sums=('46e6e5f1bfdbc52e5956f06add575e9c7697c673d53d3803dfe768f490b560f0')

build() {
  arch-meson $pkgname-$pkgver build -D gtk_doc=true
  meson compile -C build
}

check() {
  xvfb-run -s '-screen 0 1920x1080x24 -nolisten local' \
    meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

